<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="head.htm" />
<link rel="stylesheet" type="text/css" href="css/style1.css" />
</head>
<body>
	<img src="images/hitch_banner.jpg"/>
	<div id="head">
		<h1>Hitch</h1>
	</div>
	<div id="content">
		<h2>
			<c:out value="${title}" />
		</h2>
		<p>
			<c:out value="${message}" />
		</p>
		<form:form method="post" action="register.html" modelAttribute="user">
			<form:errors path="*" element="div" />
			<fieldset>
				<label for="name"><fmt:message key="register.name" />:</label>
				<form:input path="name" />
				<form:errors path="name" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<label for="lastname"><fmt:message key="register.lastname" />:</label>
				<form:input path="lastname" />
				<form:errors path="lastname" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<label for="gender"><fmt:message key="register.gender" />:</label>
				<fieldset>
					<form:radiobutton path="gender" id="radioMale" value="1" />
					<label for="radioMale"><fmt:message key="register.male" /></label>
					<form:errors path="gender" element="div" cssClass="error" />
				</fieldset>
				<fieldset>
					<form:radiobutton path="gender" id="radioFemale" value="2" />
					<label for="radioFemale"><fmt:message key="register.female" /></label>
					<form:errors path="gender" element="div" cssClass="error" />
				</fieldset>
			</fieldset>
			<fieldset>
				<label for="birthdate"><fmt:message key="register.birthdate" />:</label>
				<jsp:useBean id="date" class="java.util.Date" />
				<fmt:formatDate pattern="dd/MM/yyyy" value="${user.birthdate}"
					var="bd" />
				<form:input path="birthdate" value="${bd}"   class="date"/>
				<form:errors path="birthdate" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<label for="username"><fmt:message key="register.username" />:</label>
				<form:input path="username" />
				<form:errors path="username" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<label for="password"><fmt:message key="register.password" />:</label>
				<form:password path="password" />
				<form:errors path="password" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<label for="passwordConfirm"><fmt:message
						key="register.password_confirm" />:</label>
				<form:password path="passwordConfirm" />
				<form:errors path="passwordConfirm" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<label for="email"><fmt:message key="register.e_mail" />:</label>
				<form:input path="email" />
				<form:errors path="email" element="div" cssClass="error" />
			</fieldset>
			<fieldset>
				<div class="form-buttons">
					<div class="button">
						<input name="register" id="submit" type="submit"
							value="<fmt:message key="button.register"/>"> </input>
					</div>
				</div>
			</fieldset>
		</form:form>
		<a href="login.html">Login</a>
	</div>
</body>
</html>